from datetime import datetime

from django.db import models


# # Create your models here.
# class Counters(models.Model):
#     id = models.AutoField
#     count = models.IntegerField(max_length=11, default=0)
#     createdAt = models.DateTimeField(default=datetime.now(), )
#     updatedAt = models.DateTimeField(default=datetime.now(),)
#
#     def __str__(self):
#         return self.title
#
#     class Meta:
#         db_table = 'Counters'  # 数据库表名
class EmpNoVsTel(models.Model):
    id = models.AutoField
    name = models.CharField(max_length=20)
    phone = models.CharField(max_length=20)
    EmpNo=models.CharField(max_length=20)

    def __str__(self):
        return self.title
    class Meta:
        db_table='EmpNoVsTel'


class salaryList(models.Model):
    id = models.AutoField
    date = models.DateTimeField(default=datetime.now())
    EmpNo=models.CharField(max_length=20)
    crypt=models.CharField(max_length=2000)

    def __str__(self):
        return self.title

    class Meta:
        db_table = 'salaryList'






class EmpTestNo(models.Model):


    id = models.AutoField
    name=models.CharField(max_length=20)
    phone = models.CharField(max_length=20)
    testno=models.CharField(max_length=20)
    date=models.DateTimeField(default=datetime.now())

    def __str__(self):
        return self.title
    class Meta:
        db_table='EmpTestNo'


class dailyReport(models.Model):
    id = models.AutoField
    sj=models.DateTimeField(default=datetime.now())
    dept_code=models.CharField(max_length=20,default='0')
    dept_name=models.CharField(max_length=30,default='0')
    sl=models.IntegerField(default=0)
    ry=models.IntegerField(default=0)
    cy=models.IntegerField(default=0)
    createTime=models.DateTimeField(default=datetime.now(),)

    def __str__(self):
        return self.title
    class Meta:
        db_table='dailyReport'



class requestList(models.Model):
    id=models.AutoField
    reship=models.CharField(max_length=10)
    name=models.CharField(max_length=10)
    cardType=models.CharField(max_length=3)
    cardId=models.CharField(max_length=30)
    phoneNumber=models.CharField(max_length=30)
    temp=models.FloatField()
    date =models.DateTimeField()
    selected=models.CharField(max_length=500)
    signature=models.TextField()

    def __str__(self):
        return self.title
    class Meta:
        db_table='requestList'

class dailyReport2(models.Model):
    id = models.AutoField
    date=models.DateTimeField()
    zbmzrs=models.IntegerField()
    zhbmzrs=models.IntegerField()
    jz = models.IntegerField()
    frmz = models.IntegerField()
    yygh=models.IntegerField()
    mzsr=models.FloatField()
    mzyb=models.FloatField()
    jssr = models.FloatField()
    jssryb = models.FloatField()
    jssrzf = models.FloatField()
    cyrs=models.IntegerField()
    mzrs=models.IntegerField()
    mzrsyb=models.IntegerField()
    mzrszf=models.IntegerField()
    mzzf=models.FloatField()
    zyrs=models.IntegerField()
    ryrs=models.IntegerField()
    zbbz=models.IntegerField()
    zbbw=models.IntegerField()
    zhbbz=models.IntegerField()
    zhbbw=models.IntegerField()
    qzfsz=models.FloatField()


    def __str__(self):
        return self.title
    class Meta:
        db_table='dailyReport2'